Skip to content

fix(Table): the column filter trigger is Core's ghost IconButton at size sm - #14248

Open
cixzhang wants to merge 4 commits into
mainfrom
l0/table-header-filter-iconbutton
Open

cixzhang wants to merge 4 commits into
mainfrom
l0/table-header-filter-iconbutton

Conversation

@cixzhang

@cixzhang cixzhang commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Stack: #14248 → #14105 (this is the base; #14105 builds the Sort control on it).

User impact

  • Who: people who filter a Table column from its header.
  • Before: the filter trigger was a hand-styled 12 px funnel button with its own hover, focus and touch rules, so it looked and sized differently from every other icon button.
  • After: the filter trigger is Core's ghost IconButton at size sm. It takes Button's own hover, focus ring, press and touch target, and the sort control in the same header uses the same Button in the change stacked on this one.
  • Unchanged: its name ("Filter "), its popover, the accent color when a filter is set, and the faint look until the header is hovered or the trigger has keyboard focus.
  • Header height: the header row takes Button sm's 28 px box. Under a mouse, each header row with a filter is 8 px taller at every density (compact 28.5 → 36.5 px, balanced 36.5 → 44.5 px, spacious 44.5 → 52.5 px, measured in Chromium in the new HeaderDensities story). Under a coarse pointer the old trigger grew to a 44 px box and Button keeps its 28 px box with a 44 px touch band, so those rows are 16 px shorter than on main (52.5 → 36.5, 60.5 → 44.5, 68.5 → 52.5 px).
  • Known limit: at compact density the header cell's overflow: hidden clips the trigger's 44 px touch band to the 36.5 px row, so a tap a few pixels below the button misses it. This pull request records it as a present-tense gap in component:TableHeaderCell (Current-state impact).

Visual authority

  • Correction already settled by current family, design, theme, or objective accessibility authority.

The owner asked that the Table header's controls use Core's Button and look consistent beside each other, instead of re-creating what Button already handles. This change applies that to the header's one existing control; the sort control follows in the stacked change.

Before and after

Branded Chrome (Google Chrome 158.0.8127.108 on macOS, the repository's Chrome stills workflow), head 6d3c634 against main 267688b, its merge base:

Story, viewport, theme main this head
core-tablefiltering--with-sorting, desktop 1280×800, light main, desktop 1280×800, light this head, desktop 1280×800, light
core-tablefiltering--with-sorting, desktop 1280×800, dark main, desktop 1280×800, dark this head, desktop 1280×800, dark
core-tablefiltering--with-sorting, mobile 390×844, light main, mobile 390×844, light this head, mobile 390×844, light
core-tablefiltering--with-sorting, mobile 390×844, dark main, mobile 390×844, dark this head, mobile 390×844, dark
  • The funnel draws at Button sm's icon size inside a 28 px ghost button, so each header row is 8 px taller; the label and the sort glyph keep their places.
  • Its faint look until the header is hovered, and the accent color once a filter is set, are unchanged.

State matrix

  • Densities: compact, balanced and spacious, in the HeaderDensities story.
  • Light and dark.
  • Unfiltered (faint until hover or focus) and filtered (accent).

Scope

Components: Table

  • Appearance is the primary intent.

  • Behavior, API, interaction model, and unrelated layout changes were removed or split.

  • The evidence shows the changed pixels actively running, not only source or computed styles.

  • Public text and artifacts contain no internal Meta context.

  • useTableFiltering.tsx: the popover trigger is <IconButton variant="ghost" size="sm" … />; the hand-written triggerButton and triggerActive styles and the now-unused radius token import go. The triggerInactive opacity stays as the button's xstyle.

  • TableFiltering.stories.tsx: a HeaderDensities story, a sortable and filterable header at each density.

  • TableHeaderCell.spec.md: a Current-state impact line for the clipped touch band at compact density.

  • .changeset/table-filter-trigger-iconbutton.md: credits the contributor.

Writing rubric results

Records touched: component:TableHeaderCell (one Current-state impact line).

  • R1 (system, not project): pass. The line states what the cell does today.
  • R2 (no research): pass.
  • R3 (evidence cites facts): pass. It names the clip and the row height, not a pull request.
  • R4 (rejected alternatives): pass. None recorded.
  • R5 (no pull request as standing content): pass.
  • R6 (open questions): pass. None changed.
  • R7 (no project status): pass. It is a present-tense gap against the touch-target rule, not a plan.

Testing

  • vitest run packages/core/src/Table: 52 files, 974 tests pass (the filter trigger is found by its role and name).
  • TypeScript (Core), ESLint and Prettier: clean; Storybook builds.
  • Header heights measured in Chromium at each density, light and dark (above).

Overlap checked: #11785, #10943, #5313 (each edits useTableFiltering.tsx elsewhere: a fixed table height, plugin refs, and a phone filter sheet button; none touches the header's popover trigger)

Owner: Astryx fix-loop lane 0. Land path: CodeBunny approval of the exact head, Specs stamp, CI, then the merge queue.

@cixzhang cixzhang added ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) lane:0 Astryx fix-loop lane 0 owns this labels Dec 3, 2026
@vercel

vercel Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Dec 3, 2026 2:58pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Dec 3, 2026
@astracat-bot

astracat-bot Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Dec 3, 2026, 3:12 PM UTC

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · c43f62a

Storybook · Sandbox · built from this PR's head

Current run: Heavy CI deferred: runs when review passes and before merge. Lint, typecheck and any path-filtered checks ran on this push.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs an engineering owner's decision before it can be approved, and three fixes are needed regardless.

  • The filter trigger's new presentation needs an owner decision: no current spec covers the trigger becoming a ghost IconButton at size sm (Button's hover fill, press scale and focus ring, a 28 px box, a 16 px funnel, and header rows with a filter 8 px taller under a mouse), since the Table spec leaves filtering anatomy out of scope, so an engineering owner records the decision by commenting /approve-spec <full head SHA> here, which the author may do as an engineering owner.
  • The changeset credits no contributor, so CI's lint job fails: the Lint job's check:changesets step rejects .changeset/table-filter-trigger-iconbutton.md because it has no @handle line, so add the author's handle on its own line after the release note.
  • The header-height claim is false under a finger: under a coarse pointer the old trigger grew to a 44 px box and the new one does not, so header rows with a filter get 16 px shorter (52.5 → 36.5, 60.5 → 44.5, 68.5 → 52.5 px, reproduced with touch emulation), and the "8 px taller at every density" sentence should say it applies under a mouse and add the touch change.
  • No test opens or applies the filter popover: the Table suite passes (52 files, 974 tests, reproduced locally), but no test opens the popover or presses Apply, so add one that clicks "Filter Name", fills the input, applies and asserts onFilterChange, or drop "popover opens and applies" from the Testing line.
  • Compact headers clip the trigger's touch band to 36 px (non-blocking): the header cell's overflow: hidden cuts Button's 44 px touch band, so in compact density a tap 4 px below the button misses it.

The touch-target part already follows the touch-presentation spec, and the name, popover, accent colour and faint resting look are unchanged in the browser.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Title: the filter trigger is Core's ghost icon button at size small: verified (useTableFiltering.tsx:1008-1015).
  • Before: a hand-styled 12 px funnel button with its own hover, focus and touch rules: verified (base styles; 12 × 12 px box in the browser).
  • After: it takes Button's hover, focus ring, press and touch target: verified (hover fill, 2 px ring and 8 px hit insets in the browser; Button press styles).
  • The sort control moves to the same Button in a later change: not checked (another pull request, not declared as a stack).
  • Name, popover, accent colour when filtered and faint look until header hover or keyboard focus are unchanged: verified (browser probes on base and head).
  • Header rows are 8 px taller at every density: false under a coarse pointer (16 px shorter); true under a mouse.
  • The correction is already settled by current authority: unverified; only the touch-target part is (touch-presentation spec).
  • Before and after stills follow: reported, not yet posted.
  • State matrix (three densities, light and dark, unfiltered and filtered): verified (story renders each, captured here).
  • Scope checklist: appearance-first, no API or interaction-model change, no internal context: verified; the running-pixels evidence item: reported.
  • Scope file notes (trigger swap, removed styles and radius import, opacity kept as xstyle; the new story): verified.
  • Table tests, 52 files and 974 tests pass: verified (run here); they cover opening and applying the popover: false.
  • TypeScript clean: verified (CI typecheck). ESLint clean: verified (run here on the changed files). Prettier clean and Storybook builds: reported (CI's formatting step was skipped; the story rendered in a dev server here).
  • Header heights measured in Chromium: verified under a mouse (run here).
  • Three other open pull requests edit this file elsewhere and none touches the trigger: verified (their diffs; one changes the trigger component's state handling, not the button or its styles).
  • Changeset: ghost icon button with Button's hover, focus, press and touch target; name, popover and accent colour unchanged: verified; the file fails the contributor-credit check.
  • .changeset/table-filter-trigger-iconbutton.md: finding (no contributor credit).
  • apps/storybook/stories/TableFiltering.stories.tsx: clear.
  • packages/core/src/Table/plugins/filtering/useTableFiltering.tsx: owner decision on the presentation; non-blocking touch-band note.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about the filter trigger's new presentation, and three description claims need fixing regardless; the changeset credit is now fixed.

  • The filter trigger's new presentation needs an owner decision: no current spec covers the trigger becoming a ghost IconButton at size sm (a 28 px box, a 16 px funnel and header rows with a filter 8 px taller under a mouse), since the Table spec leaves filtering anatomy out of scope, so an engineering owner records the decision by commenting /approve-spec <full head SHA> here, which the author may do as an engineering owner.
  • The mouse hover, press and motion change needs a recorded owner decision: for mouse users the trigger now gains Button's hover fill, a 0.98 press scale and Button's transitions, and the description's mention of an owner request does not record a decision, so the owner's explicit decision for this desktop change needs to be stated in the description.
  • The header-height claim is false under a finger: under a coarse pointer the old trigger grew to a 44 px box and the new one does not, so header rows with a filter get 16 px shorter (52.5 → 36.5, 60.5 → 44.5, 68.5 → 52.5 px, reproduced with touch emulation), and both "8 px taller" sentences (User impact and the Before and after notes) should say they apply under a mouse and add the touch change.
  • No test opens or applies the filter popover: the Table suite passes (52 files, 974 tests, reproduced locally), but no test opens the popover or presses Apply, so add one that clicks "Filter Name", fills the input, applies and asserts onFilterChange, or drop "popover opens and applies" from the Testing line.
  • The label and sort glyph do not keep their places: the header cell centres them, so they sit 4 px lower under a mouse and 8 px higher under a finger as the row height changes (measured locally), and the Before and after note should say they keep their inline positions instead.
  • Compact headers clip the trigger's touch band to 36 px (non-blocking): the header cell's overflow: hidden cuts Button's touch band, so in compact density a tap 4 px below the button misses it.

The touch-target part already follows the touch-presentation spec, and the name, popover, accent colour and faint resting look are unchanged in the browser.

Claims and files checked

Review mode: incremental; reason: none

  • Title: the filter trigger is Core's ghost icon button at size small: verified (useTableFiltering.tsx:1008-1015).
  • Changeset: the trigger is the ghost small icon button and takes Button's hover, focus, press and touch target; name, popover and accent colour unchanged; author credited: verified (code, browser probes, changeset check run locally and in the Lint job).
  • Before: a hand-styled 12 px funnel button with its own hover, focus and touch rules: verified (base styles; 12 × 12 px box in the browser).
  • After: it takes Button's hover, focus ring, press and touch target: verified (hover fill, 2 px ring and hit band in the browser; Button's press styles).
  • The sort control uses the same Button in the change stacked on this one: verified (#14105 contains this head and renders its sort control as the same ghost small icon button; no Stack line, so this change is reviewed alone).
  • Unchanged name, popover, accent colour when filtered, and faint look until hover or keyboard focus: verified (browser probes, both themes).
  • Header height 8 px taller at every density: true under a mouse, false under a coarse pointer (finding).
  • Correction already settled by current authority: false; no current spec covers the trigger's presentation (finding).
  • The owner asked for Button-based header controls: unverified; no decision is recorded (finding).
  • Before and after stills from branded Chrome: reported; the component code is unchanged since the head they show.
  • Before and after notes: rows 8 px taller (false under a finger, finding); label and sort glyph keep their places (false, finding); faint look and accent colour unchanged (verified).
  • State matrix (three densities, light and dark, unfiltered and filtered): verified (story and frames).
  • Scope checklist: appearance is the primary intent and no API or interaction-model change rides along: verified; the mouse press, hover and motion come with the Button swap and wait on the owner decision; no internal context found.
  • Scope list (trigger swap, removed styles and radius import, inactive opacity as xstyle, new story): verified (diff).
  • Testing: 52 files and 974 tests pass: verified (run locally); popover opens and applies: false (finding); TypeScript, ESLint, Prettier and Storybook: verified (typecheck and Lint jobs at this head; lint, formatting and Storybook run locally); header heights measured: reported, matches the mouse probe.
  • Overlap with three other open changes: verified (none edits the trigger button; one edits the trigger component's state).
  • .changeset/table-filter-trigger-iconbutton.md: clear.
  • apps/storybook/stories/TableFiltering.stories.tsx: clear.
  • packages/core/src/Table/plugins/filtering/useTableFiltering.tsx: owner decision needed; compact touch band note.

Automated review (maintainer link)

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Dec 3, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about the filter trigger's new presentation, and three claims need fixing regardless; the Testing line and the compact touch band are fixed.

  • The filter trigger's new presentation needs an owner decision: no current spec covers the trigger becoming a ghost IconButton at size sm (a 28 px box, a 16 px funnel and header rows with a filter 8 px taller under a mouse), since the Table spec leaves filtering anatomy out of scope, so an engineering owner records the decision by commenting /approve-spec <full head SHA> here, which the author may do as an engineering owner.
  • The mouse hover, press and motion change needs a recorded owner decision: for mouse users the trigger now gains Button's hover fill, a 0.98 press scale and Button's transitions, and the description's mention of an owner request does not record a decision, so the owner's explicit decision for this desktop change needs to be stated in the description.
  • The new record line says the Sort control is a 28 px Button: in this pull request the Sort control is still the native button around the label (useTableSortable.tsx:373), so drop "or the Sort control" from the TableHeaderCell Current-state impact line and say that in a compact header the touch band reaches only about 4 px above and below the button (measured locally).
  • The Before and after header-height note has no pointer bound: "each header row is 8 px taller" holds only under a mouse, since header rows with a filter are 16 px shorter under a coarse pointer (reproduced with touch emulation), so bound it as the User impact bullet now does.
  • The label and sort glyph do not keep their places: the header cell centres them, so they sit 4 px lower under a mouse and 8 px higher under a finger (measured locally), and the note should say they keep their inline positions instead.

The two Stack: lines, here and in #14105, differ after the pull request numbers, so this pull request was reviewed on its own.

Claims and files checked

Review mode: full; reason: spec-record

  • Title: the filter trigger is Core's ghost icon button at size small: verified (useTableFiltering.tsx:1008-1015).
  • Changeset: the trigger takes Button's hover, focus, press and touch target; name, popover and accent colour unchanged; author credited: verified (code, browser probes, changeset check run locally).
  • Stack note: the next change builds the Sort control on this one: verified (#14105 renders it as the same ghost small icon button); the Stack lines differ, so this change is reviewed alone.
  • Before: a hand-styled 12 px funnel button with its own hover, focus and touch rules: verified (base styles; 12 × 12 px in the browser).
  • After: it takes Button's hover, focus ring, press and touch target, and the stacked change gives the sort control the same Button: verified (hover fill, 2 px ring and hit band in the browser; Button's press styles; #14105's sort control).
  • Unchanged name, popover, accent colour when filtered, and faint look until header hover or keyboard focus: verified (browser probes).
  • Header height: 8 px taller under a mouse and 16 px shorter under a coarse pointer, with the six row heights: verified (probes run locally).
  • Known limit: the compact cell clips the touch band, so a tap a few pixels below the button misses it, and the header cell spec records it: verified (hit test run locally; record diff).
  • Correction already settled by current authority: false; no current spec covers the trigger's presentation (finding).
  • The owner asked for Button-based header controls: unverified; no decision is recorded (finding).
  • Before and after stills from branded Chrome: reported; the component code is unchanged since the head they show.
  • Before and after notes: rows 8 px taller (no pointer bound, finding); label and sort glyph keep their places (false, finding); faint look and accent colour unchanged (verified).
  • State matrix (three densities, light and dark, unfiltered and filtered): verified (story and frames).
  • Scope checklist: appearance is the primary intent and no separable API or interaction change rides along: verified; the mouse hover, press and motion come with the Button swap and wait on the owner decision; no internal context found.
  • Scope list (trigger swap, removed styles and radius import, inactive opacity as xstyle, new story, header cell spec line, changeset credit): verified (diff).
  • Writing rubric results: the record line states what the cell does today: false for its Sort-control clause (finding); the other six results verified.
  • Testing: 52 files and 974 tests pass, the trigger found by role and name: verified (run locally; useTableFiltering.test.tsx:185); TypeScript, ESLint and Prettier clean: verified (typecheck and lint jobs at this head; ESLint and Prettier run locally); Storybook builds: reported, and the dev server compiled the stories locally; header heights measured: verified.
  • Overlap with three other open changes: verified (none edits the trigger button; one edits the trigger component's open state and draft store).
  • Owner and land path: reported.
  • .changeset/table-filter-trigger-iconbutton.md: clear.
  • apps/storybook/stories/TableFiltering.stories.tsx: clear.
  • docs/specs/components/Table/TableHeaderCell.spec.md: Sort-control clause finding.
  • packages/core/src/Table/plugins/filtering/useTableFiltering.tsx: owner decisions needed.

Automated review (maintainer link)

## Current-state impact

- **Touch band clipped at compact density.** A header control such as the
column filter trigger or the Sort control is a 28 px Button with a 44 px touch

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this pull request the Sort control is still the native <button> around the label (useTableSortable.tsx:373), not a Button; it becomes one in #14105. Drop "or the Sort control" here. Measured locally, the compact band reaches about 4 px above and 3.5 px below the 28 px button (a tap 1 to 3 px away still reaches it), so "a tap more than about 4 px above or below the button misses it" is more exact.

This branch was successfully deployed

1 active deployment
Preview — c43f62a9 Deployed Dec 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) CLA Signed This label is managed by the Meta Open Source bot. lane:0 Astryx fix-loop lane 0 owns this needs:design-review Affects visuals — Design should review needs:spec-owner-review Current knowledge records await owner approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant